var express = require('express');
var expressWs = require('express-ws');
var userRouter = require('./router/user.router.js');

var app = express();
expressWs(app);
app.use('/user', userRouter);

app.set('port', process.env.PORT || 3000); // 设定监听端口

var server = app.listen(app.get('port'), function () {
  console.log('Express server listening on port ' + server.address().port);
});